-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.1 KB
/
gh-pages.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
38
39
40
41
42
43
44
45
46
47
48
49
name: Publish to GitHub pages
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Composer cache
uses: actions/cache@v4
with:
path: ~/.composer/cache/repo
key: composer-cache
- name: Prepare Composer auth
run: |
mkdir -p ~/.composer
cat > ~/.composer/auth.json <<EOL
{
"github-oauth": {
"github.com": "${{ secrets.GH_PAT }}"
}
}
EOL
- name: Build the repository and site
run: ./build.sh
- name: Put the CNAME
if: success()
run: echo 'composer.talis.io' > dist/CNAME
- name: Deploy to GitHub Pages
if: ${{ success() && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: dist
jekyll: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}