1.0.2 #48
Workflow file for this run
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: Deploy | |
on: | |
# Runs on pushes targeting tags | |
push: | |
tags: | |
- "*" | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
packages: write | |
env: | |
IMAGE_NAME: ghcr.io/esa-earthcode/portal:${{ github.head_ref || github.ref_name }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout staging | |
uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
- run: npm ci | |
- run: npm run build --if-present | |
- name: Build image | |
run: docker build -t $IMAGE_NAME . | |
- name: Login ghcr | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin | |
- name: Push ghcr | |
run: docker push $IMAGE_NAME |