utxo-prague/.github/workflows/deploy.yml

57 řádky
1.4 KiB
YAML

name: Test, build, deploy
on:
push:
branches:
- master # Set a branch to deploy
pull_request:
jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- uses: szenius/set-timezone@v1.0
with:
timezoneLinux: "Europe/Prague"
- name: Build sources
run: make
# - name: Build changelog
# run: make changelog
- name: Add custom domain
run: "touch dist/CNAME && echo \"spec.utxo.cz\" >> dist/CNAME"
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
trigger_explore_rebuild:
needs: [deploy]
runs-on: ubuntu-latest
environment:
name: remote-triggers
steps:
- run: |
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{secrets.PAT_TOKEN}}"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/utxo-foundation/utxo23-web/actions/workflows/gh-pages.yml/dispatches \
-d '{"ref":"master"}'