Update github workflows

astro
Kamran Ahmed 2 years ago
parent f268ca934a
commit b7544a5c44
  1. 2
      .github/FUNDING.yml
  2. 34
      .github/workflows/deploy.yml
  3. 38
      .github/workflows/sync-content.sh
  4. 38
      .github/workflows/update-deps.yml

@ -0,0 +1,2 @@
# These are supported funding model platforms
github: kamranahmedse

@ -0,0 +1,34 @@
name: Deployment to GH Pages
on:
push:
branches: [ master ]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PAT: ${{ secrets.PAT }}
CI: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/setup-node@v1
with:
node-version: 18
- run: git config --global url."https://${{ secrets.PAT }}@github.com/".insteadOf ssh://git@github.com/
- uses: pnpm/action-setup@v2.2.2
with:
version: 7.13.4
- name: Setup Environment
run: |
pnpm install
- name: Generate meta and build
run: |
npm run build
- name: Deploy to GH Pages
run: |
git config user.email "kamranahmed.se@gmail.com"
git config user.name "Kamran Ahmed"
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npm run deploy

@ -0,0 +1,38 @@
name: Sync v1 Content
on:
workflow_dispatch: # allow manual run
schedule:
- cron: '0 0 * * *' # daily at midnight
jobs:
sync-v1-content:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2.2.2
with:
version: 7.13.4
- name: Install dependencies
run: |
pnpm install
cd bin && git clone --depth 1 -b master https://${{ secrets.GH_TOKEN }}@github.com/kamranahmedse/developer-roadmap.git
npm run sync-content
- name: Create PR
uses: peter-evans/create-pull-request@v4
with:
delete-branch: false
branch: "sync-content"
base: "master"
labels: |
sync-content
automated pr
reviewers: kamranahmedse
commit-message: "chore: sync changes from v1 to v2"
title: "Sync content changes from v1 to v2"
body: |
Synchronizes content changes from v1 to v2
Please review the changes and merge if everything looks good.

@ -0,0 +1,38 @@
name: Update dependencies
on:
workflow_dispatch: # allow manual run
schedule:
- cron: '0 0 * * 0' # every sunday at midnight
jobs:
upgrade-deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2.2.2
with:
version: 7.13.4
- name: Upgrade dependencies
run: |
pnpm install
npm run upgrade
pnpm install --lockfile-only
- name: Create PR
uses: peter-evans/create-pull-request@v4
with:
delete-branch: false
branch: "update-deps"
base: "master"
labels: |
dependencies
automated pr
reviewers: kamranahmedse
commit-message: "chore: update dependencies to latest"
title: "Upgrade dependencies to latest"
body: |
Updates all dependencies to latest versions.
Please review the changes and merge if everything looks good.
Loading…
Cancel
Save