From 7224602a8402f1dabee9245f31426b8f230deeb8 Mon Sep 17 00:00:00 2001 From: Kat Inskip Date: Sun, 7 Apr 2024 10:24:04 -0700 Subject: [PATCH] build: add CI for publishing site to branch --- .github/workflows/publish.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..bfbcd92 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: Publish +on: + push: + branches: [main] +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install + run: | + curl -LSfs https://raw.githubusercontent.com/crate-ci/gh-install/master/v1/install.sh | \ + sh -s -- \ + --git cobalt-org/cobalt.rs \ + --crate cobalt \ + --force \ + --target x86_64-unknown-linux-gnu \ + --tag v0.19.0 + echo COBALT_BIN=~/.cargo/bin/cobalt >> $GITHUB_ENV + - name: Build + run: ${{ env.COBALT_BIN }} build + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_branch: site + publish_dir: _site \ No newline at end of file