generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b27e1bc
commit 94c78a0
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Build Docs Image & Deploy to GHCR | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- add-docs | ||
workflow_dispatch: | ||
|
||
jobs: | ||
push-store-image: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: './docs' | ||
steps: | ||
- name: 'Checkout GitHub Action' | ||
uses: actions/checkout@main | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: | | ||
ghcr.io/samuelmwangiw/at-laravel-docs:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM node:lts-alpine as build | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN apk add --no-cache git && \ | ||
npm ci && \ | ||
npm run docs:build | ||
|
||
FROM nginx:stable-alpine | ||
|
||
LABEL org.opencontainers.image.source="https://github.com/SamuelMwangiW/africastalking-laravel" | ||
LABEL org.opencontainers.image.licenses="MIT" | ||
|
||
COPY --from=build /app/.vitepress/dist /usr/share/nginx/html | ||
|
||
EXPOSE 80 |