Generate Static Website #25
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
name: Generate Static Website | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: ["Publish Docker Image"] | |
types: [completed] | |
jobs: | |
publish-github-pages: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 22 | |
- name: Build package | |
run: | | |
npm ci | |
npm run build | |
- name: Generate website | |
env: | |
NUXT_PUBLIC_SITE_URL: ${{vars.NUXT_PUBLIC_SITE_URL}} | |
NUXT_PUBLIC_SITE_EMAIL: ${{vars.NUXT_PUBLIC_SITE_EMAIL}} | |
run: | | |
cd ./site | |
npm ci | |
npm run generate | |
- name: Generate docs | |
run: | | |
npm run docs | |
- name: Check in the changes | |
run: | | |
git config --global user.name "github-actions" | |
git config --global user.email "github-actions@github.com" | |
git add . | |
git commit -m "chore(site): publish website" | |
git push origin |