Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: create links file from github action #34

Merged
merged 4 commits into from
Sep 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/update-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Update Redirect Links

on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"

jobs:
update-redirect-links:
name: Update Redirect Links
runs-on: ubuntu-latest

steps:
- name: Git Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744

- name: Cache Dependencies
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: |
~/.npm
node_modules/.cache
key: ${{ runner.os }}-npm-${{ hashFiles('**/workflows/format.yml') }}
restore-keys: ${{ runner.os }}-npm-

- name: Install dependencies
run: npm install

- name: Update Redirect Links
run: node scripts/update-redirect-links.js && npm run format
env:
CF_ACCESS_KEY_ID: ${{ secrets.CF_ACCESS_KEY_ID }}
CF_SECRET_ACCESS_KEY: ${{ secrets.CF_SECRET_ACCESS_KEY }}

- name: Open PR with updates
uses: peter-evans/create-pull-request@v5
with:
commit-message: Update Redirect links
title: "chore: update redirect links"
body: |
This PR updates the links for url redirects.
branch: update-redirect-links
delete-branch: true
base: main

Loading