should work now #28
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: Continuous deployment | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Pre-req | |
| run: | | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| pkg-config \ | |
| libudev-dev llvm libclang-dev \ | |
| protobuf-compiler libssl-dev | |
| - name: Install rust | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
| echo "$HOME/.cargo/env" >> $GITHUB_PATH | |
| - name: Install Solana CLI | |
| run: | | |
| sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)" | |
| echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH | |
| - name: Install Anchor | |
| run: | | |
| cargo install --git https://github.com/solana-foundation/anchor avm --force | |
| avm install latest | |
| avm use latest | |
| anchor build | |
| - uses: borales/actions-yarn@v4 | |
| with: | |
| cmd: install | |
| dir: web | |
| - uses: borales/actions-yarn@v4 | |
| with: | |
| cmd: build | |
| dir: web | |
| - name: Build website | |
| run: | | |
| cd web/ | |
| touch ./dist/.nojekyll | |
| echo "whwhat.me" > ./dist/CNAME | |
| mv ./dist ../ | |
| - name: Upload static files as artifact | |
| id: deployment | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: ./dist | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Configure pages | |
| uses: actions/configure-pages@v5 | |
| - name: Deploy to gh pages (whwhat.me) | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |