Bump on-headers and compression #110
This file contains hidden or 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 Website | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| jobs: | |
| checks: | |
| if: github.event_name != 'push' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/setup-node@v1 | |
| with: | |
| node-version: '12.x' | |
| - name: Test Build | |
| run: | | |
| if [ -e yarn.lock ]; then | |
| yarn install | |
| elif [ -e package-lock.json ]; then | |
| npm ci | |
| else | |
| npm i | |
| fi | |
| npm run build | |
| gh-release: | |
| if: github.event_name != 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/setup-node@v1 | |
| with: | |
| node-version: '12.x' | |
| - name: Build | |
| run: | | |
| if [ -e yarn.lock ]; then | |
| yarn install | |
| elif [ -e package-lock.json ]; then | |
| npm ci | |
| else | |
| npm i | |
| fi | |
| npx docusaurus build | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./build | |
| cname: ichnion.code4myself.org |