feat: add community forum section #28
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
# Simple workflow for deploying static content to GitHub Pages | |
# Copies the main branch to the root of the deployment, and the staging branch into the /staging/ subfolder | |
name: Deploy | |
on: | |
# Runs on pushes targeting the default branch and tags | |
push: | |
branches: | |
- main | |
- staging | |
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 }}-${{ github.run_number }} | |
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 |