Skip to content

Commit

Permalink
improve ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
yulianzavodnyk committed Sep 1, 2024
1 parent 1fbc186 commit c3763eb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 22 deletions.
25 changes: 8 additions & 17 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,24 @@ jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest

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

- name: Setup Node.js
- name: Setup Node.js Environment
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'

# Cache node_modules
- name: Cache node_modules
uses: actions/cache@v3
with:
path: |
node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node_modules-
- name: Install dependencies
- name: Install Project Dependencies
run: npm ci

# Always build the website
- name: Build website
- name: Build the Docusaurus Website
run: npm run build

- name: Check build folder size
- name: Display Build Folder Size
run: du -sh ./build

- name: Deploy to GitHub Pages
Expand All @@ -44,4 +35,4 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
user_email: 41898282+github-actions[bot]@users.noreply.github.com
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "my-website",
"version": "0.0.0",
"name": "iasa-articles-website",
"version": "1.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand All @@ -19,13 +19,13 @@
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.9.0",
"@docusaurus/plugin-google-analytics": "latest",
"@docusaurus/plugin-google-tag-manager": "latest",
"@docusaurus/plugin-sitemap": "latest",
"@docusaurus/plugin-pwa": "latest",
"@docusaurus/plugin-pwa": "^2.3.0",
"@docusaurus/plugin-seo": "latest",
"@docusaurus/plugin-robots-txt": "latest",
"@docusaurus/plugin-content-blog": "latest"
Expand Down

0 comments on commit c3763eb

Please sign in to comment.