Skip to content

Commit

Permalink
Update .github/workflows/
Browse files Browse the repository at this point in the history
  • Loading branch information
Phuker committed Nov 19, 2022
1 parent 20a7c49 commit b48a876
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 5 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/clean_up.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# https://github.com/marketplace/actions/delete-workflow-runs

name: Clean up

on:
workflow_run:
workflows: [Deploy to GitHub Pages]
types:
- completed

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

permissions:
actions: write

jobs:
clean_up:
runs-on: ubuntu-latest
steps:
- name: Delete workflow runs (Deploy to GitHub Pages)
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 0
keep_minimum_runs: 0
delete_workflow_pattern: Deploy to GitHub Pages
delete_run_by_conclusion_pattern: success
- name: Delete workflow runs (self)
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 0
keep_minimum_runs: 0
delete_workflow_pattern: Clean up
7 changes: 2 additions & 5 deletions .github/workflows/deploy_github_pages.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
name: Deploy remote static content to GitHub Pages
name: Deploy to GitHub Pages

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

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

Expand All @@ -16,7 +14,6 @@ concurrency:
cancel-in-progress: true

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
Expand All @@ -26,7 +23,7 @@ jobs:
- name: Download and extract remote tarball
env:
REMOTE_TARBALL_URL: ${{ secrets.REMOTE_TARBALL_URL }}
run: curl -fsSL "${REMOTE_TARBALL_URL:?invalid}" | tar -xzvf -
run: curl -fsSL "${REMOTE_TARBALL_URL:?invalid}" | tar -xzf -
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
Expand Down

0 comments on commit b48a876

Please sign in to comment.