2024-03-04 15:38:34 +01:00
|
|
|
|
name: Deploy to GitHub Pages
|
|
|
|
|
|
2023-11-28 03:05:02 +01:00
|
|
|
|
on:
|
2024-03-04 15:38:34 +01:00
|
|
|
|
# Trigger the workflow every time you push to the `main` branch
|
|
|
|
|
# Using a different branch name? Replace `main` with your branch’s name
|
|
|
|
|
push:
|
|
|
|
|
branches: [ main ]
|
|
|
|
|
# Allows you to run this workflow manually from the Actions tab on GitHub.
|
|
|
|
|
workflow_dispatch:
|
|
|
|
|
workflow_run:
|
|
|
|
|
workflows: ["Synchronize data"]
|
|
|
|
|
types:
|
|
|
|
|
- completed
|
|
|
|
|
|
|
|
|
|
# Allow this job to clone the repo and create a page deployment
|
2023-11-28 03:05:02 +01:00
|
|
|
|
permissions:
|
2024-03-04 15:38:34 +01:00
|
|
|
|
contents: read
|
|
|
|
|
pages: write
|
|
|
|
|
id-token: write
|
|
|
|
|
|
2023-11-28 03:05:02 +01:00
|
|
|
|
jobs:
|
2024-03-04 15:38:34 +01:00
|
|
|
|
build:
|
2023-11-28 03:05:02 +01:00
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
2024-03-04 15:38:34 +01:00
|
|
|
|
- name: Checkout your repository using git
|
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
2023-11-28 03:05:02 +01:00
|
|
|
|
- uses: denoland/setup-deno@v1
|
|
|
|
|
with:
|
|
|
|
|
deno-version: v1.x
|
|
|
|
|
|
2024-05-17 17:46:42 +02:00
|
|
|
|
- uses: szenius/set-timezone@v2.0
|
2023-11-28 03:05:02 +01:00
|
|
|
|
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"
|
2024-03-04 15:38:34 +01:00
|
|
|
|
|
|
|
|
|
- name: Upload Pages artifact
|
2024-08-28 19:24:28 +02:00
|
|
|
|
uses: actions/upload-artifact@v4
|
2023-11-28 03:05:02 +01:00
|
|
|
|
with:
|
2024-03-04 15:38:34 +01:00
|
|
|
|
path: ./dist
|
|
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
|
needs: build
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
environment:
|
|
|
|
|
name: github-pages
|
|
|
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
|
|
|
steps:
|
|
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
|
id: deployment
|
2024-05-17 17:46:42 +02:00
|
|
|
|
uses: actions/deploy-pages@v4
|