-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 1.04 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Deploy Site
on:
push:
branches: [ main ]
paths:
- '**.ftd'
- '**.md'
workflow_dispatch:
workflow_call:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: FranzDiebold/github-env-vars-action@v2
- name: Install fastn
id: install_fastn
continue-on-error: false
run: sh -c "$(curl -fsSL https://raw.githubusercontent.com/ftd-lang/fastn/main/install.sh)"
- name: Build the pages with fastn
id: build
continue-on-error: false
run: |
echo "Using '$CI_REPOSITORY_NAME_SLUG/' as the base while building"
fastn build --base=/$CI_REPOSITORY_NAME/
- name: copy CNAME
run: '(test -f CNAME && cp CNAME .build) || echo "CNAME does not exist, skipping step"'
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./.build