update publish workflow to deploy from the correct directory and remo… #4
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
| on: [push] | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # build your site for deployment... in this case the `public` folder is being deployed | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| - name: Build Site | |
| run: | | |
| pnpm install | |
| pnpm run build | |
| - name: Publish | |
| uses: South-Paw/action-netlify-cli@v2 | |
| id: netlify | |
| with: | |
| # be sure to escape any double quotes with a backslash | |
| args: 'deploy --json --prod --dir \"./dist\" --message \"production [${{ github.sha }}]\"' | |
| env: | |
| NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
| NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
| # and access outputs in other steps with ${{ steps.netlify.outputs.OUTPUT_ID }} |