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

wiki automation #190

Closed
wants to merge 5 commits into from
Closed
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
8 changes: 2 additions & 6 deletions .github/workflows/stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: playlet

- name: Checkout Wiki
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}.wiki
path: playlet.wiki
path: ./playlet.wiki

- name: Configure repo
run: |
git config --local user.email "[email protected]"
git config --local user.name "github-action wiki updater"
working-directory: ./playlet
working-directory: ./playlet.wiki

- name: Use Node.js 18.x
uses: actions/setup-node@v3
Expand All @@ -34,11 +32,9 @@ jobs:

- name: Install dependencies
run: npm ci
working-directory: ./playlet

- name: Download attachements
run: node tools/download-stats.js
working-directory: ./playlet
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GMAIL_CREDENTIALS: ${{ secrets.GMAIL_CREDENTIALS }}
Expand Down
4 changes: 3 additions & 1 deletion tools/download-stats.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const markdownFile = "../playlet.wiki/Home.md"
const fs = require('fs')

const markdownFile = "./playlet.wiki/Home.md"

const markdownContent = `
# Playlet stats
Expand Down