-
Notifications
You must be signed in to change notification settings - Fork 13
61 lines (53 loc) · 1.87 KB
/
build-and-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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build and Deploy
on: [push]
jobs:
prepare-webflasher:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Build manifest files for Webflasher 🔧
run: |
python .github/webflasher.py
- name: Display structure of files 🔍
run: ls -R ./src/.vuepress/public/pixelit_flasher
- name: Upload build artifacts 💾
uses: actions/upload-artifact@v3
with:
name: webflasher-manifest-files
path: |
./src/.vuepress/public/pixelit_flasher/meta.json
./src/.vuepress/public/pixelit_flasher/manifest/*.json
- name: Commit new manifest files📝
run: |
git config --global user.name 'PixelIt Pipeline Bot'
git config --global user.email 'bot@pixelit'
if [[ $(git status --porcelain) ]]; then
git add --all
git commit -m "Pushed new manifest files via GitHub Actions"
git push
echo "Changes committed."
else
echo "No uncommitted changes found."
fi
build-and-deploy:
runs-on: ubuntu-latest
needs: prepare-webflasher
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Download build artifacts 💾
uses: actions/download-artifact@v3
with:
name: webflasher-manifest-files
path: ./src/.vuepress/public/pixelit_flasher
- name: Display structure of downloaded files 🔍
run: ls -R ./src/.vuepress/public
- name: vuepress-deploy 🚀
uses: jenkey2011/vuepress-deploy@master
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
TARGET_REPO: pixelit-project/pixelit-project.github.io
TARGET_BRANCH: gh-pages
BUILD_SCRIPT: yarn && yarn build
BUILD_DIR: src/.vuepress/dist/