Skip to content

Commit

Permalink
ci: change upload action
Browse files Browse the repository at this point in the history
  • Loading branch information
filipslezaklab committed Jan 18, 2024
1 parent 47740a7 commit ed4a7e6
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,21 @@ on:
branches:
- main

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build-static:
environment:
name: github-pages
runs-on: [self-hosted, Linux]
steps:
- name: Checkout
Expand Down Expand Up @@ -36,21 +49,19 @@ jobs:
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: "dist/"
name: github-pages
path: dist

deploy:
needs: build-static
runs-on: [self-hosted, Linux]
if: github.ref == 'refs/heads/main'
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: [self-hosted, Linux]
if: github.ref == 'refs/heads/main'
steps:
- name: Deploy pages
id: deployment
Expand Down

0 comments on commit ed4a7e6

Please sign in to comment.