Upgrades #52
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: Jekyll site CI | |
on: | |
push: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install toolchain | |
run: rustup target add wasm32-unknown-unknown | |
- name: Install binstall | |
run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash | |
- name: Install trunk | |
run: cargo binstall trunk -y | |
- name: Install npm deps | |
run: npm i | |
working-directory: ./doteur_wasm | |
- name: Build package | |
run: trunk build --release --public-url https://nag763.github.io/doteur/live | |
working-directory: ./doteur_wasm | |
- name: Copy generated | |
run: mkdir -p ../docs/live; cp -r dist/* ../docs/live/ | |
working-directory: ./doteur_wasm | |
- name: Extra steps to have it working with github | |
run: | | |
docker run \ | |
-v ${{ github.workspace }}/docs:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \ | |
jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future" | |
- name: Upload GitHub Pages artifact | |
uses: actions/[email protected] | |
with: | |
path: ./_site | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |