diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..30215ea --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,34 @@ +name: GitHub Pages + +on: + push: + branches: + - main + - feat/ci + +jobs: + deploy: + runs-on: ubuntu-22.04 + permissions: + contents: write + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v3 + - name: Install + uses: cachix/install-nix-action@v22 + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + extra_nix_config: | + experimental-features = nix-command flakes + nix_path: nixpkgs=channel:nixos-unstable + + - name: Build + run: nix develop -c trunk build + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/feat/ci' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist diff --git a/.gitignore b/.gitignore index db13512..4f07a73 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,6 @@ dist/ templates/ -assets/ +draft/ .DS_Store