Skip to content

Commit

Permalink
enabling action to build gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinblack committed Apr 13, 2023
1 parent 476d7d6 commit a8a8f34
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions .github/workflows/site-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,37 @@ on:

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

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

permissions:
contents: write
pages: write

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: npm ci, build and test
- name: build site
run: |
npm ci
npm run build --if-present
npm test
# - name: deploy to gh-pages
# uses: peaceiris/actions-gh-pages@v3
# with:
# deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
# publish_dir: ./build
npm install
npm install gh-pages --save-dev
- name: deploy to gh-pages
env:
#GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_EMAIL: dblack@redhat.com
GH_USERNAME: dustinblack
run: |
git config --global user.name $GH_USERNAME
git config --global user.email $GH_EMAIL
git remote set-url origin https://$GH_USERNAME:${{ secrets.GH_SECRET }}@github.com/redhat-performance/tooling-curator.git
npm run deploy
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}

0 comments on commit a8a8f34

Please sign in to comment.