name: deploy on: push: branches: [ main ] jobs: deploy-pages: name: deploy/pages runs-on: ubuntu-latest permissions: contents: write if: ${{ github.event_name == 'push' }} steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: { persist-credentials: false } - name: Use Node.js from nvmrc uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 with: node-version-file: '.nvmrc' - name: Install run: npm ci - name: Build run: npm run build - name: Upload to GitHub Pages uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: dist # publish docker to GitHub registry deploy-docker: name: deploy/docker runs-on: ubuntu-latest if: ${{ github.event_name == 'push' }} permissions: contents: read packages: write strategy: fail-fast: false steps: - name: Login to GitHub Container Registry uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - run: docker build -t ghcr.io/maplibre/maputnik:main . - run: docker push ghcr.io/maplibre/maputnik:main