2023-01-23 00:48:00 +01:00
|
|
|
name: Test, build, deploy
|
2023-01-23 00:42:21 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2023-01-23 00:48:00 +01:00
|
|
|
- main # Set a branch to deploy
|
2023-01-23 00:42:21 +01:00
|
|
|
pull_request:
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
steps:
|
2023-01-23 00:48:00 +01:00
|
|
|
- name: Setup repo
|
|
|
|
uses: actions/checkout@v3
|
2023-01-23 00:42:21 +01:00
|
|
|
with:
|
2023-01-23 00:48:00 +01:00
|
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Deno
|
|
|
|
#uses: denoland/setup-deno@v1
|
|
|
|
uses: denoland/setup-deno@9db7f66e8e16b5699a514448ce994936c63f0d54
|
2023-01-23 00:42:21 +01:00
|
|
|
with:
|
|
|
|
deno-version: v1.x
|
|
|
|
- uses: szenius/set-timezone@v1.0
|
|
|
|
with:
|
|
|
|
timezoneLinux: "Europe/Prague"
|
|
|
|
- name: Build sources
|
|
|
|
run: make
|
2023-01-23 00:48:00 +01:00
|
|
|
# - name: Build changelog
|
|
|
|
# run: make changelog
|
2023-01-23 17:10:31 +01:00
|
|
|
- name: List ./dist
|
|
|
|
run: find dist
|
2023-01-23 00:42:21 +01:00
|
|
|
- name: Add custom domain
|
|
|
|
run: "touch dist/CNAME && echo \"data.prgblockweek.com\" >> dist/CNAME"
|
|
|
|
- name: Deploy
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
2023-01-23 00:48:00 +01:00
|
|
|
publish_dir: ./dist
|