forked from songxiaofeng1981/best
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (52 loc) · 1.85 KB
/
vercel.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
name: vercel
on:
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Pull Docker Image
run: docker pull xiquwugou/my-jekyll-image-site:latest
- name: Process Images
run: docker run -v ${{ github.workspace }}/images:/images xiquwugou/my-jekyll-image-site:latest /process-images.sh
- name: Move WebP Images
run: |
sudo find ${{ github.workspace }}/images -type f -name '*.webp' -exec mv {} ${{ github.workspace }}/app/photos/original \;
- name: Set Repo Name
id: repo-name
run: echo "REPO_NAME=$(echo $GITHUB_REPOSITORY | cut -d'/' -f2)" >> $GITHUB_ENV
- name: Build Jekyll Site
run: docker run -v ${{ github.workspace }}/app:/app -e REPO_NAME='' xiquwugou/my-jekyll-image-site:latest /bin/bash -l -c "/build-site.sh"
- name: Upload Static Site
uses: actions/upload-artifact@v2
with:
name: static-site
path: app/_site
deploy-static-html:
needs: build-and-deploy
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Download Static Site
uses: actions/download-artifact@v2
with:
name: static-site
path: downloaded-site
- name: Print File Tree
run: tree downloaded-site
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: vercel
folder: downloaded-site
clean: true
single-commit: true
force: true
ssh-key: ${{ secrets.MY_SSH_PRIVATE_KEY }}