No need to export formattedDate #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint, Build and Deploy | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' | |
push: | |
branches: | |
- main | |
jobs: | |
Lint-Deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Gives access to repository | |
uses: actions/checkout@v4 | |
- name: Setup Node version | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: npm install | |
- name: Generate frontend data | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: node src/index.js | |
- name: Generate Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: my-artifact | |
path: frontend/public/frontend.json | |
- name: Install Frontend | |
run: cd frontend && npm install | |
- name: Build Vue | |
run: cd frontend && npm run build | |
- name: Deploy Vue Site | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./frontend/dist | |
publish_branch: gh-pages | |
user_name: 'OSS Check My Repo' | |
user_email: '[email protected]' | |
commit_message: ${{ github.event.head_commit.message }} |