Github Pages Deployment #237
This file contains hidden or 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 Deployment' | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - '**.yml' | |
| schedule: | |
| - cron: '20 4 * * 6' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: './site' | |
| steps: | |
| - name: 'github / checkout' | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: 'github / ruby / setup' | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.4.7 | |
| bundler-cache: true | |
| - name: 'ruby / bundle install' | |
| run: | | |
| cd prep | |
| bundle install | |
| cd ../../.stranger-quarkdown | |
| bundle install | |
| - name: 'github / node / setup' | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'latest' | |
| cache: 'npm' | |
| cache-dependency-path: './site/package-lock.json' | |
| - name: 'svelte / npm install' | |
| run: npm install | |
| - name: 'svelte / npm run build' | |
| env: | |
| BASE_PATH: '/${{ github.event.repository.name }}' | |
| run: | | |
| npm run buildx | |
| - name: 'svelte / npm run test' | |
| run: | | |
| npx playwright install | |
| npm run test | |
| - name: 'github / upload artifacts' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: 'site/build/' | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: 'github / deploy' | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |