Merge pull request #7 from ur-whitelab/photo #171
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: Publish Website | |
on: | |
push: | |
branches: # triggers on any push to main | |
- main | |
workflow_dispatch: | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- run: node --version | |
- name: Cache node modules | |
uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm- | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build-prod | |
- name: Talks | |
run: | | |
mkdir -p dist/talks && cd dist/talks | |
wget -O tmp.zip "https://www.dropbox.com/scl/fi/tiuvyw8bu0qpa5ydjwwsx/dist.zip?rlkey=esbhbzbf77ek81sb308e64w2n&dl=1" | |
ls -l | |
unzip tmp | |
mv dist latest | |
rm *.zip | |
cd ../../ | |
- name: Apps | |
run: | | |
mkdir -p dist/apps && cd dist/apps | |
wget -O exe.zip https://www.dropbox.com/s/c25yg42ouck6t7c/exe.zip?dl=0 && unzip exe && mv exe rxns | |
rm *.zip | |
cd ../../ | |
- name: Blog | |
run: | | |
cd dist/ | |
wget -O blog.zip https://www.dropbox.com/s/rmf2qg4byt5v4i9/_site.zip?dl=0 && unzip blog && mv _site blog | |
rm *.zip && cd .. | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist | |
cname: thewhitelab.org |