From f39edfeedcf7cc3dab99e9bbd60c17b4b8006fae Mon Sep 17 00:00:00 2001 From: Easyoakland <97992568+Easyoakland@users.noreply.github.com> Date: Tue, 8 Aug 2023 23:14:17 -0600 Subject: [PATCH] Add github pages site deployment. --- .github/workflows/pages.yml | 36 ++++++++++++++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/pages.yml diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..f0c85be --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,36 @@ +name: Pages +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + # - name: Dump github context + # run: echo "$GITHUB_CONTEXT" + # shell: bash + # env: + # GITHUB_CONTEXT: ${{ toJson(github) }} + - name: Setup | Checkout + uses: actions/checkout@v3 + - name: Setup wasm32 target + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: wasm32-unknown-unknown + override: true + - name: Download trunk + uses: taiki-e/install-action@v2 + with: + tool: trunk + - name: Build + run: trunk build --release --public-url ${{ github.event.repository.name }} + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist diff --git a/.gitignore b/.gitignore index 2d97e03..83eeb9e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /target /dist .* +!.github !.gitignore \ No newline at end of file