2023-10-08 01:51:51 +02:00
|
|
|
name: Build and Deploy
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2024-09-24 12:15:48 +02:00
|
|
|
- main # Set a branch to deploy
|
2023-10-08 01:51:51 +02:00
|
|
|
pull_request:
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
jobs:
|
|
|
|
build-and-deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
steps:
|
2024-05-10 11:02:29 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-10-08 01:51:51 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- uses: denoland/setup-deno@v1
|
|
|
|
with:
|
|
|
|
deno-version: v1.x
|
|
|
|
|
2024-05-10 11:02:29 +02:00
|
|
|
- uses: szenius/set-timezone@v2.0
|
2023-10-08 01:51:51 +02:00
|
|
|
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
|
2023-12-18 14:25:29 +01:00
|
|
|
run: "touch dist/CNAME && echo \"explorer-data.web3privacy.info\" >> dist/CNAME"
|
2023-10-08 02:02:55 +02:00
|
|
|
|
2023-10-08 02:16:59 +02:00
|
|
|
- name: Deploy
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
2024-09-24 12:15:48 +02:00
|
|
|
if: ${{ github.ref == 'refs/heads/main' }}
|
2023-10-08 01:51:51 +02:00
|
|
|
with:
|
2023-10-08 02:16:59 +02:00
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
2023-12-18 14:25:29 +01:00
|
|
|
publish_dir: ./dist
|