Skip to content

Commit

Permalink
Update and rename nextjs.yml to imgur.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sunwu51 authored Aug 18, 2024
1 parent 3e6573d commit 3565462
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 93 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/imgur.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Download Imgur Images and Deploy to GitHub Pages
on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm install axios mkdirp markdown-link-extractor

- name: Scan and download Imgur images
run: node download-imgur-images.js

- name: Commit and push imgur directory
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add imgur
git commit -m 'Add downloaded Imgur images'
git push origin main
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./imgur
93 changes: 0 additions & 93 deletions .github/workflows/nextjs.yml

This file was deleted.

0 comments on commit 3565462

Please sign in to comment.