2023-11-28 03:05:02 +01:00
|
|
|
name: Build and Deploy
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main # Set a branch to deploy
|
|
|
|
pull_request:
|
2024-03-03 23:53:42 +01:00
|
|
|
workflow_run:
|
|
|
|
workflows: ["Synchronize data"]
|
|
|
|
types:
|
|
|
|
- completed
|
2023-11-28 03:05:02 +01:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
jobs:
|
|
|
|
build-and-deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
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: Cache
|
|
|
|
run: make cache
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
run: make test
|
|
|
|
|
|
|
|
- name: Build bundle
|
|
|
|
run: make build
|
|
|
|
|
2024-01-25 21:42:36 +01:00
|
|
|
- name: Add custom domain
|
|
|
|
run: "touch dist/CNAME && echo \"data.web3privacy.info\" >> dist/CNAME"
|
2023-11-28 03:05:02 +01:00
|
|
|
|
|
|
|
- name: Deploy
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
if: ${{ github.ref == 'refs/heads/main' }}
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
publish_dir: ./dist
|