Skip to content

Commit

Permalink
update GitHub Actions workflow for Elm deployment; streamline steps a…
Browse files Browse the repository at this point in the history
…nd enhance permissions for GitHub Pages
  • Loading branch information
ahmedakef committed Jan 8, 2025
1 parent 42420bd commit bf4d3c7
Showing 1 changed file with 25 additions and 18 deletions.
43 changes: 25 additions & 18 deletions .github/workflows/elm.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,39 @@
# This is a basic workflow to help you get started with Actions
# Workflow for compiling elm and deploying static content to GitHub Pages
name: Deploy static content to Pages

name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
# Runs on pushes targeting the default branch
push:
branches: ["main"]
pull_request:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Setup Elm
uses: jorelali/setup-elm@v1
Expand All @@ -35,9 +45,6 @@ jobs:

- name: Compile to JS
run: make -C frontend/

- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down

0 comments on commit bf4d3c7

Please sign in to comment.