Skip to content

NeuroDesk/neurocommand applist.json update #1063

NeuroDesk/neurocommand applist.json update

NeuroDesk/neurocommand applist.json update #1063

Workflow file for this run

name: github pages
on:
push:
branches: ["main"]
repository_dispatch:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.112.7
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Pages
id: pages
uses: actions/configure-pages@v2
- name: Set baseURL
run: sed -i "s|https://www.neurodesk.org/|${{ steps.pages.outputs.base_url }}/|g" config.toml
- name: Install dependencies
run: |
npm install
- name: Build with Hugo
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
echo "BASEURL=${{ steps.pages.outputs.base_url }}"
hugo \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Add custom domain
if: github.repository == 'NeuroDesk/neurodesk.github.io'
run: cp ./static/CNAME ./public/CNAME
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./public
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
# - name: Algolia crawler creation and crawl
# uses: algolia/[email protected]
# id: algolia_crawler
# with: # mandatory parameters
# crawler-user-id: ${{ secrets.CRAWLER_USER_ID }}
# crawler-api-key: ${{ secrets.CRAWLER_API_KEY }}
# algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }}
# algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }}
# site-url: 'https://www.neurodesk.org'
check-links:
runs-on: ubuntu-latest
needs: deploy
steps:
- uses: actions/checkout@master
- name: Setup Pages
id: pages
uses: actions/configure-pages@v2
- name: Create config file
run: |
echo ${{ steps.pages.outputs.base_url }}
echo '{
"replacementPatterns": [
{
"pattern": "^/",
"replacement": "${{ steps.pages.outputs.base_url }}/"
}
],
"ignorePatterns": [
{
"pattern": "^https://twitter.com"
},
{
"pattern": "^http://localhost"
}
],
"aliveStatusCodes": [429, 403, 200]
}' > .github/workflows/config.json
cat .github/workflows/config.json
- uses: gaurav-nelson/github-action-markdown-link-check@v1
# checks all markdown files from content/en including all subfolders
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: '.github/workflows/config.json'
folder-path: 'content/en/'