Update to eleventy v3 release #175
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: Build and Publish | |
# Trigger this workflow only when the main branches, assets folder is modified. | |
on: | |
push: | |
branches: [ "main", "master" ] | |
paths-ignore: | |
- '**/README.md' | |
- '.github/workflows/playwright.yml' | |
- 'tests/**' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
deployments: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 20 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Build the static site | |
# If you use gists, generate a GH_GIST_TOKEN and add to repository action secrets. | |
# If GH_GIST_TOKEN doesn't exist, it's an unauthenticated call to Gist API... | |
# Unauthenticated call gets made to Gist API from Github Actions will result in rate limits and gists will fail to load. | |
# You can't use secrets.GITHUB_TOKEN either, as it's scoped to the repository and not the gists! | |
run: /bin/bash -c 'npm install;npm run build --gisttoken=${{ secrets.GH_GIST_TOKEN }} --githubtoken=${{ secrets.GITHUB_TOKEN }}' | |
- name: Setup Github Pages | |
uses: actions/configure-pages@v2 | |
- name: Upload Github Pages artifact | |
uses: actions/upload-pages-artifact@v1 | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |