-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (39 loc) · 1.19 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
38
39
40
41
42
43
44
45
46
name: Deploy as Github Page on fbernutz.github.io
on:
push:
branches:
- master
jobs:
deploy:
runs-on: macOS-12
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/cache@v4.0.0
with:
path: |
~/Publish_build
.build
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Setup JohnSundell/Publish
run: |
cd ${HOME}
export PUBLISH_VERSION="0.9.0"
git clone https://github.com/JohnSundell/Publish.git
cd ./Publish && git checkout ${PUBLISH_VERSION}
mv ~/Publish_build .build || true
swift build -c release
cp -r .build ~/Publish_build || true
echo "${HOME}/Publish/.build/release" >> ${GITHUB_PATH}
- name: Generate Output
run: publish-cli generate
- name: Deploy Content
uses: peaceiris/actions-gh-pages@v3.9.3
with:
personal_token: ${{ secrets.PERSONAL_TOKEN }}
external_repository: fbernutz/fbernutz.github.io
publish_branch: master
publish_dir: ./Output
commit_message: ${{ github.event.head_commit.message }}