Skip to content

Build Joplin Website #3766

Build Joplin Website

Build Joplin Website #3766

Workflow file for this run

name: Build Joplin Website
on:
schedule:
- cron: "0 */6 * * *"
workflow_dispatch:
jobs:
# We run the plugin website CI in a separate job that doesn't have
# SSH key access for extra security because it handles untrusted markdown.
PluginWebsite:
runs-on: ubuntu-latest
steps:
- name: Checkout Joplin plugin website repository
uses: actions/checkout@v2
with:
repository: 'joplin/website-plugin-discovery'
ref: main
path: 'website-plugin-discovery'
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Build
shell: bash
run: |
cd website-plugin-discovery
yarn install
yarn build-production /plugins
cd site
# Create a .tar.gz for uploading
tar -czvf ../../plugin-website.tar.gz .
# Send to the main website workflow.
# See https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts#passing-data-between-jobs-in-a-workflow
- name: Upload built plugins
uses: actions/upload-artifact@v3
with:
name: plugin-website
path: plugin-website.tar.gz
retention-days: 1
Main:
runs-on: ubuntu-latest
needs: PluginWebsite
steps:
- name: Checkout main Joplin repository
uses: actions/checkout@v2
with:
repository: 'laurent22/joplin'
ref: dev
ssh-key: ${{ secrets.JOPLIN_BOT_SSH_PRIVATE_KEY }}
path: 'joplin'
- name: Checkout Joplin website repository
uses: actions/checkout@v2
with:
repository: 'joplin/website'
ref: master
ssh-key: ${{ secrets.JOPLIN_BOT_SSH_PRIVATE_KEY }}
path: 'joplin-website'
- name: Download built plugin website
uses: actions/download-artifact@v3
with:
name: plugin-website
- name: Install dependencies
run: |
sudo apt-get update || true
sudo apt-get install -y libsecret-1-dev
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Release website
env:
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
GIT_USER_NAME: Joplin Bot
IS_CONTINUOUS_INTEGRATION: 1
DISCOURSE_API_KEY: ${{ secrets.DISCOURSE_API_KEY }}
DISCOURSE_USERNAME: ${{ secrets.DISCOURSE_USERNAME }}
JOPLIN_GITHUB_OAUTH_TOKEN: ${{ secrets.JOPLIN_GITHUB_OAUTH_TOKEN }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
run: |
./joplin/packages/tools/release-website.sh