Skip to content

Commit 7ccee63

Browse files
author
Administrator
committed
test ALGOLIA_APP_ID
1 parent 68d51d0 commit 7ccee63

File tree

1 file changed

+51
-46
lines changed

1 file changed

+51
-46
lines changed

.github/workflows/hugo-github-linux-build-deploy.yml

Lines changed: 51 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -34,58 +34,63 @@ jobs:
3434
submodules: true
3535
# If using the 'assets' git submodule from Chirpy Starter, uncomment above
3636
# (See: https://github.com/cotes2020/chirpy-starter/tree/main/assets)
37-
- name: Cache Hugo Resources
38-
uses: actions/cache@v3
39-
with:
40-
path: |
41-
resources
42-
public
43-
key: ${{ runner.os }}-hugo-${{ github.sha }}
44-
restore-keys: |
45-
${{ runner.os }}-hugo-
37+
# - name: Cache Hugo Resources
38+
# uses: actions/cache@v3
39+
# with:
40+
# path: |
41+
# resources
42+
# public
43+
# key: ${{ runner.os }}-hugo-${{ github.sha }}
44+
# restore-keys: |
45+
# ${{ runner.os }}-hugo-
4646

47-
- name: Setup Pages
48-
id: pages
49-
uses: actions/configure-pages@v4
47+
# - name: Setup Pages
48+
# id: pages
49+
# uses: actions/configure-pages@v4
5050

51-
- name: 安装 Hugo
52-
uses: peaceiris/actions-hugo@v3
53-
with:
54-
hugo-version: 'latest' # 也可以指定具体版本,如 '0.123.4'
55-
extended: true # 是否安装扩展版(支持 SCSS/SASS)
51+
# - name: 安装 Hugo
52+
# uses: peaceiris/actions-hugo@v3
53+
# with:
54+
# hugo-version: 'latest' # 也可以指定具体版本,如 '0.123.4'
55+
# extended: true # 是否安装扩展版(支持 SCSS/SASS)
5656

57-
- name: show veresion
58-
run: hugo version
57+
# - name: show veresion
58+
# run: |
59+
# hugo version
60+
- name: show ALGOLIA_APP_ID
61+
run: |
62+
echo "ALGOLIA_APP_ID=${{ secrets.ALGOLIA_APP_ID }}"
63+
echo "ALGOLIA_WRITE_KEY=${{ secrets.ALGOLIA_WRITE_KEY }}"
5964
60-
- name: Build site
61-
run: pwd && HUGO_ENVIRONMENT=production hugo #--gc --minify &
65+
# - name: Build site
66+
# run: pwd && HUGO_ENVIRONMENT=production hugo #--gc --minify &
6267

63-
- name: Upload site artifact
64-
uses: actions/upload-pages-artifact@v3
65-
with:
66-
path: public
68+
# - name: Upload site artifact
69+
# uses: actions/upload-pages-artifact@v3
70+
# with:
71+
# path: public
6772
# node js 上传搜索数据
68-
- name: Setup Node.js
69-
uses: actions/setup-node@v4
70-
with:
71-
node-version: 23
73+
# - name: Setup Node.js
74+
# uses: actions/setup-node@v4
75+
# with:
76+
# node-version: 23
7277

73-
- name: Install node dependencies
74-
run: npm install
78+
# - name: Install node dependencies
79+
# run: npm install
7580

76-
- name: 上传索引到 algolia
77-
env:
78-
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
79-
ALGOLIA_WRITE_KEY: ${{ secrets.ALGOLIA_WRITE_KEY }}
80-
run: npm run upload
81+
# - name: 上传索引到 algolia
82+
# env:
83+
# ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
84+
# ALGOLIA_WRITE_KEY: ${{ secrets.ALGOLIA_WRITE_KEY }}
85+
# run: npm run upload
8186

82-
deploy:
83-
environment:
84-
name: github-pages
85-
url: ${{ steps.deployment.outputs.page_url }}
86-
runs-on: ubuntu-latest
87-
needs: build-hugo-blog
88-
steps:
89-
- name: Deploy to GitHub Pages
90-
id: deployment
91-
uses: actions/deploy-pages@v4
87+
# deploy:
88+
# environment:
89+
# name: github-pages
90+
# url: ${{ steps.deployment.outputs.page_url }}
91+
# runs-on: ubuntu-latest
92+
# needs: build-hugo-blog
93+
# steps:
94+
# - name: Deploy to GitHub Pages
95+
# id: deployment
96+
# uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)