notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

pages.yml (1965B)


      1 name: Github Pages
      2 
      3 # By default, runs if you push to master. keeps your deployed app in sync with master branch.
      4 on:
      5   push:
      6     branches:
      7       - master
      8 # to only run when you do a new github release, comment out above part and uncomment the below trigger.
      9 # on:
     10 #   release:
     11 #     types:
     12 #       - published
     13 
     14 permissions:
     15   contents: write # for committing to gh-pages branch.
     16 
     17 jobs:
     18   build-github-pages:
     19     runs-on: ubuntu-latest
     20     steps:
     21       - uses: actions/checkout@v2 # repo checkout
     22       - uses: actions-rs/toolchain@v1 # get rust toolchain for wasm
     23         with:
     24           profile: minimal
     25           toolchain: stable
     26           target: wasm32-unknown-unknown
     27           override: true
     28       - name: Rust Cache # cache the rust build artefacts
     29         uses: Swatinem/rust-cache@v1
     30       - name: Download and install Trunk binary
     31         run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
     32       - name: Build # build
     33         # "${GITHUB_REPOSITORY#*/}" evaluates into the name of the repository
     34         # using --public-url something will allow trunk to modify all the href paths like from favicon.ico to repo_name/favicon.ico .
     35         # this is necessary for github pages where the site is deployed to username.github.io/repo_name and all files must be requested
     36         # relatively as eframe_template/favicon.ico. if we skip public-url option, the href paths will instead request username.github.io/favicon.ico which
     37         # will obviously return error 404 not found.
     38         run: ./trunk build --release --public-url "${GITHUB_REPOSITORY#*/}"
     39       - name: Deploy
     40         uses: JamesIves/github-pages-deploy-action@v4
     41         with:
     42           folder: dist
     43           # this option will not maintain any history of your previous pages deployment
     44           # set to false if you want all page build to be committed to your gh-pages branch history
     45           single-commit: true