Improved pipeline to start Docker build before static files are created #4
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: GitHub Pages | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
schedule: | ||
Check failure on line 8 in .github/workflows/pages.yml GitHub Actions / GitHub PagesInvalid workflow file
|
||
- cron: 0 6 * * 1 | ||
workflow_dispatch: | ||
permissions: | ||
pages: write | ||
contents: read | ||
id-token: write | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
jobs: | ||
docker-image: | ||
uses: ./.github/workflows/docker-image.yml | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: [ docker-image ] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Build website | ||
run: npm run build | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v5 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./dist | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |