-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (46 loc) · 1.43 KB
/
Copy pathmain.yml
File metadata and controls
50 lines (46 loc) · 1.43 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
name: ✍️ Document and 🚀 Deployment
on:
push:
branches: [ source ]
tags: [ "*" ]
pull_request:
workflow_dispatch:
jobs:
documents:
name: "Build and deploy site"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- uses: extractions/setup-just@v1
- name: Build documentation
run: |
python -m pip install --upgrade poetry
poetry install
just build
- name: Deploy preview to Surge
if: github.event_name == 'pull_request'
env:
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
run: |
npx surge --project site \
--domain michaeljoseph-preview-${{ github.event.number }}.surge.sh \
--token ${{ secrets.SURGE_TOKEN }}
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/source'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
publish_branch: main
cname: mycull.dev
- name: Deploy to Surge
if: github.ref == 'refs/heads/source'
env:
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
run: |
# npx surge --project site \
# --domain michaeljoseph.surge.sh \
# --token ${{ secrets.SURGE_TOKEN }}