Skip to content

Commit a8a8f34

Browse files
committed
enabling action to build gh-pages
1 parent 476d7d6 commit a8a8f34

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

.github/workflows/site-build.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,37 @@ on:
1010

1111
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1212
jobs:
13-
build_test:
13+
build_site:
1414
# The type of runner that the job will run on
1515
runs-on: ubuntu-latest
1616

1717
strategy:
1818
matrix:
1919
node-version: [12.x] # We will deploy with only one version of node
2020

21+
permissions:
22+
contents: write
23+
pages: write
24+
2125
# Steps represent a sequence of tasks that will be executed as part of the job
2226
steps:
2327
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
24-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v3
2529
- name: Use Node.js ${{ matrix.node-version }}
2630
uses: actions/setup-node@v2
2731
with:
2832
node-version: ${{ matrix.node-version }}
29-
- name: npm ci, build and test
33+
- name: build site
3034
run: |
31-
npm ci
32-
npm run build --if-present
33-
npm test
34-
# - name: deploy to gh-pages
35-
# uses: peaceiris/actions-gh-pages@v3
36-
# with:
37-
# deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
38-
# publish_dir: ./build
35+
npm install
36+
npm install gh-pages --save-dev
3937
- name: deploy to gh-pages
38+
env:
39+
#GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
41+
GH_USERNAME: dustinblack
4042
run: |
43+
git config --global user.name $GH_USERNAME
44+
git config --global user.email $GH_EMAIL
45+
git remote set-url origin https://$GH_USERNAME:${{ secrets.GH_SECRET }}@github.com/redhat-performance/tooling-curator.git
4146
npm run deploy
42-
with:
43-
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}

0 commit comments

Comments
 (0)