Merge pull request #56 from athombv/master #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Documentation To GitHub Pages | |
# v1.0.0 | |
# | |
# This workflow runs `npm run build` and then syncs the `build` folder to GitHub Pages. | |
on: | |
push: | |
branches: [ production ] | |
jobs: | |
deploy: | |
name: Build & Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: webfactory/[email protected] | |
env: | |
SSH_KEY: ${{ secrets.SSH_KEY }} | |
if: env.SSH_KEY != null | |
with: | |
ssh-private-key: ${{ env.SSH_KEY }} | |
# Setup | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
registry-url: 'https://npm.pkg.github.com' | |
- name: Install modules | |
run: npm clean-install --audit=false | |
env: | |
GITHUB_TOKEN: ${{ secrets.HOMEY_GITHUB_ACTIONS_BOT_PERSONAL_ACCESS_TOKEN }} | |
# Build | |
- name: Build | |
run: npm run build | |
# Deploy | |
- name: Deploy To GitHub Pages | |
uses: peaceiris/[email protected] | |
with: | |
personal_token: ${{ secrets.HOMEY_GITHUB_ACTIONS_BOT_PERSONAL_ACCESS_TOKEN }} | |
publish_dir: ./build |