Skip to content

Commit

Permalink
Feature/monday fetcher (#42)
Browse files Browse the repository at this point in the history
* πŸ’š push bot branch

* πŸ’š rebase bot branch with main

* πŸ’š bot/update-data

* ⬆️ node 20

* πŸ‘· use pnpm

* πŸ“ setup guide

---------

Co-authored-by: Kawin Viriyaprasopsook <[email protected]>
  • Loading branch information
bouroo and Kawin Viriyaprasopsook authored Jul 22, 2024
1 parent 65b4bfa commit 2b2f869
Show file tree
Hide file tree
Showing 9 changed files with 17,136 additions and 45,294 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/pull-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,18 @@ jobs:
- name: Setup node env πŸ—
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: yarn
node-version: 20
cache: npm

- name: Install dependencies πŸ‘¨πŸ»β€πŸ’»
run: yarn --ignore-engines
run: npm i

- name: Fetch data πŸƒπŸ»β€β™‚οΈ
run: |
touch .env
echo MONDAY_API_TOKEN=${{ secrets.MONDAY_API_TOKEN }} >> .env
echo MONDAY_BOARD_ID=${{ secrets.MONDAY_BOARD_ID }} >> .env
yarn config set ignore-engines true
yarn fetch-data
npm run fetch-data
- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,34 @@ jobs:

steps:
- name: Checkout πŸ›Ž
uses: actions/checkout@master
uses: actions/checkout@v4

- name: Setup node env πŸ—
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
cache: yarn
node-version: 20
cache: npm

- name: Install dependencies πŸ‘¨πŸ»β€πŸ’»
run: yarn
run: npm i

- name: Run tests πŸ§ͺ
run: yarn test
run: npm run test

- name: Fetch data πŸƒπŸ»β€β™‚οΈ
run: |
touch .env
echo MONDAY_API_TOKEN=${{ secrets.MONDAY_API_TOKEN }} >> .env
echo MONDAY_BOARD_ID=${{ secrets.MONDAY_BOARD_ID }} >> .env
yarn fetch-data
npm run fetch-data
- name: Build 🍳
run: yarn build
run: npm run build
env:
BASE_PATH: /promise-tracker

- name: Deploy ☁️
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ Move Forward Party promise tracker
- [Jest](https://jestjs.io) and [Vue Test Utils](https://v1.test-utils.vuejs.org/guides/#getting-started)
- ... as a database

## Quick setup
```bash
rm -rf node_modules ξ‚² 1 ✘
rm -f package-lock.json
npm cache clean --force
npm i
```

## πŸ“ Architecture

The project use static site generator (SSG) strategy. In the pipeline, API is called once before the build time, which mean no API will be called after the static site is generated. To update the site after the data is updated, site needed to be built and deployed again.
Expand Down
Loading

0 comments on commit 2b2f869

Please sign in to comment.