-
Notifications
You must be signed in to change notification settings - Fork 34
74 lines (63 loc) · 1.86 KB
/
update-docs.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
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Update Documentation
on:
push:
paths:
- 'documentation/**'
branches:
- master
jobs:
deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout vue3-google-login
uses: actions/checkout@v4
with:
repository: devbaji/vue3-google-login
path: vue3-google-login
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: |
cd vue3-google-login
npm ci
continue-on-error: false
- name: Build documentation
run: |
cd vue3-google-login
npm run docs:build
continue-on-error: false
- name: Debug - List build directory
run: |
echo "Vue3-google-login build directory contents:"
ls -la vue3-google-login/documentation/.vuepress/dist
- name: Checkout personal repo
uses: actions/checkout@v4
with:
repository: devbaji/devbaji.github.io
path: personal-repo
token: ${{ secrets.PERSONAL_REPO_TOKEN }}
- name: Clear existing documentation
run: |
rm -rf personal-repo/vue3-google-login/*
continue-on-error: false
- name: Copy built files
run: |
mkdir -p personal-repo/vue3-google-login
cp -R vue3-google-login/documentation/.vuepress/dist/* personal-repo/vue3-google-login/
continue-on-error: false
- name: Commit and push changes
run: |
cd personal-repo
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "Update vue3-google-login documentation" || echo "No changes to commit"
git push
continue-on-error: false
- name: Check for errors
if: failure()
run: |
echo "The workflow failed. Please check the logs for more information."
exit 1