more website pain #264
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 Preview | |
on: | |
push: | |
branches: | |
- dev | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
# Adjust Node setup | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18' # Change to Node v18 if Node v20 has compatibility issues | |
# Add npm cache cleaning (optional but may help) | |
- name: Clean npm cache | |
run: npm cache clean --force | |
- name: Install dependencies | |
run: npm install | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v3 | |
with: | |
hugo-version: '0.136.0' | |
extended: true | |
# Build with debugging | |
- name: Build with Debugging | |
run: | | |
npm install | |
hugo --baseURL="https://preview.oceanhealthindex.org/" --debug | |
# Copy the source to the NCEAS server | |
- name: Copy | |
uses: dataoneorg/rsync-deploy@latest | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USER }} | |
key: ${{ secrets.KEY }} | |
source: "public/" | |
target: ${{ secrets.DEPLOY_PATH_DEV }} |