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