2023-10-08 01:51:51 +02:00
|
|
|
name: Build and Deploy
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main # Set a branch to deploy
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2023-10-08 01:54:38 +02:00
|
|
|
#- name: Test
|
|
|
|
# run: make test
|
2023-10-08 01:51:51 +02:00
|
|
|
|
2023-10-08 01:54:38 +02:00
|
|
|
- name: Build bundle
|
2023-10-08 01:51:51 +02:00
|
|
|
run: make build
|
|
|
|
|
2023-10-08 02:02:55 +02:00
|
|
|
- name: Add custom domain
|
|
|
|
run: "touch dist/CNAME && echo \"data.web3privacy.info\" >> dist/CNAME"
|
|
|
|
|
2023-10-08 01:51:51 +02:00
|
|
|
- name: Deploy 🚀
|
|
|
|
uses: JamesIves/github-pages-deploy-action@v4
|
|
|
|
with:
|
|
|
|
folder: dist # The folder the action should deploy.
|