v3.2.1 #15
Workflow file for this run
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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
name: Build and deploy website | |
on: | |
push: | |
branches: [main] | |
paths: [website/**, .github/workflows/**] | |
release: | |
types: [published, unpublished, deleted] | |
workflow_dispatch: # Manually from the Actions tab | |
concurrency: | |
cancel-in-progress: true | |
group: website | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Determine latest release | |
id: determine_latest_release | |
uses: octokit/request-action@v2.x | |
with: | |
route: GET /repos/:owner_slash_repo/releases/latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
INPUT_OWNER_SLASH_REPO: ${{ github.repository }} | |
- name: Create source zip for the IS Online page | |
env: | |
SOURCE_URL: ${{ fromJson(steps.determine_latest_release.outputs.data).zipball_url }} | |
run: bash .github/workflows/create-source-zip-for-the-online-page.sh | |
- name: Create github-pages artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: website/ | |
deploy: | |
needs: build | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
permissions: # of GITHUB_TOKEN. | |
pages: write # Can deploy to Pages... | |
id-token: write # ... and verify deployment originates from appropriate source. | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |