Skip to content

Commit

Permalink
updated actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nitya committed Aug 5, 2024
1 parent b30e7e1 commit 9a446f3
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 33 deletions.
50 changes: 20 additions & 30 deletions .github/workflows/docs-deplpy-gh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,48 +9,38 @@ on:

workflow_dispatch:

permissions:
contents: write

jobs:
build:
name: Build Docusaurus
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version:
node-version: 20
cache: npm
cache-dependency-path: docs/package-lock.json
- name: Install dependencies
working-directory: docs
run: npm install
- name: Build website
working-directory: docs
run: |
npm ci
npm run build
- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/build
deploy:
name: Deploy to GitHub Pages
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./docs/build
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
4 changes: 2 additions & 2 deletions docs/src/data/feature-items.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"title": "Hugging Face",
"imagePath": "/img/logo.png",
"imagePath": "/img/hf-logo.png",
"description": "Hugging Face is a community & platform for open-source models and datasets for AI development."
},
{
Expand All @@ -11,7 +11,7 @@
},
{
"title": "Open AI ",
"imagePath": "/img/logo.png",
"imagePath": "/img/openai-logo.png",
"description": "Open AI is the research and development company behind GPT models and solutions."
}
]
Binary file added docs/static/img/hf-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion docs/static/img/logo.svg

This file was deleted.

Binary file added docs/static/img/openai-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9a446f3

Please sign in to comment.