news/.github/workflows/deploy.yml

63 lines
1.4 KiB
YAML
Raw Permalink Normal View History

2024-02-12 10:56:44 +01:00
name: Deploy to GitHub Pages
2024-02-12 10:30:05 +01:00
on:
2024-02-12 10:56:44 +01:00
# Trigger the workflow every time you push to the `main` branch
# Using a different branch name? Replace `main` with your branchs name
push:
branches: [ main ]
# Allow this job to clone the repo and create a page deployment
2024-02-12 10:30:05 +01:00
permissions:
2024-02-12 10:56:44 +01:00
contents: read
pages: write
id-token: write
2024-02-12 10:30:05 +01:00
jobs:
2024-02-12 10:56:44 +01:00
build:
2024-02-12 10:30:05 +01:00
runs-on: ubuntu-latest
steps:
2024-02-12 10:56:44 +01:00
- name: Checkout your repository using git
uses: actions/checkout@v3
- uses: szenius/set-timezone@v1.0
2024-02-12 10:30:05 +01:00
with:
2024-02-12 10:56:44 +01:00
timezoneLinux: "Europe/Prague"
2024-02-12 10:30:05 +01:00
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Build bundle
2024-02-13 14:22:58 +01:00
run: make build images
2024-02-12 10:30:05 +01:00
2024-02-12 10:56:44 +01:00
- name: Setup node
uses: actions/setup-node@v4
with:
cache: npm
2024-02-12 11:24:05 +01:00
cache-dependency-path: ./web/package-lock.json
2024-02-12 10:56:44 +01:00
2024-02-12 11:28:55 +01:00
- name: Build frontend
run: make frontend
- name: Compile all together
run: make compile
2024-02-12 10:30:05 +01:00
2024-02-12 10:56:44 +01:00
- name: Upload Pages Artifact
# Must use v2 to avoid requiring `actions/deploy-pages@v4` or newer
uses: actions/upload-pages-artifact@v2
2024-02-12 10:30:05 +01:00
with:
2024-02-12 10:56:44 +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
uses: actions/deploy-pages@v1