Complete website overhaul, plus 2 new tool tabs: NBT->PNG and PNG->DAT #20
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 to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'website/**' # Trigger only if files inside the website/ folder change | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - 'website/**' | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: website | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: EvModder/PNG-to-NBT | |
| path: png-to-nbt | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-npm-${{ hashFiles('website/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm- | |
| - run: npm install | |
| - run: npm run sync:map-colors -- ../png-to-nbt/website/src/data/mapColors.ts | |
| - run: npm run build | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: website/dist | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/deploy-pages@v4 | |
| id: deployment |