From d97fcf5707c55bda86e0c3662a3f7f9d2be78a28 Mon Sep 17 00:00:00 2001 From: Nickwasused Date: Thu, 15 Dec 2022 15:15:23 +0100 Subject: [PATCH] add build workflow --- .github/workflows/generate.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/generate.yml diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml new file mode 100644 index 0000000..ba9361f --- /dev/null +++ b/.github/workflows/generate.yml @@ -0,0 +1,28 @@ +name: Generate + +on: + push: + tags: + - '*' + +jobs: + build: + if: startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: denoland/setup-deno@v1 + with: + deno-version: v1.x + - name: Run + run: deno task run + - name: Release + uses: fnkr/github-action-ghr@v1 + env: + GHR_PATH: stations.json + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: stations.json \ No newline at end of file