Give GHA write permissions #6
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: "Deploy website" | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
name: Deploy website | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Rust | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Generate JSON containing all concerts | |
working-directory: rust | |
run: cargo run | |
- name: Set up pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 8 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build website | |
run: pnpm build --base /london_classical | |
- name: Deploy website | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: dist | |
keep_files: false |