Skip to content

Commit

Permalink
Add symlink update action (#417)
Browse files Browse the repository at this point in the history
  • Loading branch information
melissawm authored Oct 4, 2024
1 parent 8734974 commit 7be6a14
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/symlink-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Create stable symlink

on:
workflow_dispatch:
inputs:
target_directory:
description: 'The target directory to symlink to'
required: true

jobs:
symlink-stable:
runs-on: ubuntu-latest
steps:
- name: Clone artifacts repo
uses: actions/checkout@v4
with:
ref: "gh-pages"

- name: Create symlink
run: |
echo "Creating symlink to ${{ github.event.inputs.target_directory }}"
rm stable
ln -s ${{ github.event.inputs.target_directory }} stable
ls -la stable
shell: bash

- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Create stable symlink" --allow-empty
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages

0 comments on commit 7be6a14

Please sign in to comment.