-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #123 from nuxeo/master-nx-assets
Master nx assets
- Loading branch information
Showing
9 changed files
with
2,610 additions
and
282 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Build and Deploy doc.nuxeo.com | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- development | ||
- master-nx-assets | ||
|
||
jobs: | ||
documentation_ci: | ||
name: Build & Publish documentation to ${{ github.ref_name == 'master' && 'production' || 'development' }} | ||
runs-on: doc | ||
environment: | ||
name: ${{ github.ref_name == 'master' && 'production' || 'development' }} | ||
steps: | ||
|
||
- name: Configure SSH client | ||
run: | | ||
echo "$SSH_CONFIG" >> $HOME/.ssh/config | ||
env: | ||
SSH_CONFIG: "${{ secrets.SSH_CONFIG }}" | ||
|
||
- name: Set up SSH | ||
uses: webfactory/ssh-agent@d4b9b8ff72958532804b70bbe600ad43b36d5f2e # v0.8.0 | ||
with: | ||
ssh-private-key: ${{ secrets.SERVER_SSH_PRIVATE_KEY }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Check Versions and Save to File | ||
run: | | ||
echo "git $(git --version)" > runtime-versions.txt | ||
echo "node version $(node --version)" >> runtime-versions.txt | ||
echo "npm version $(npm --version)" >> runtime-versions.txt | ||
echo "IP $(curl -s ipinfo.io/ip)" >> runtime-versions.txt | ||
- name: Install dependencies | ||
run: npm ci --registry="https://registry.npmjs.org" || npm install --registry="https://registry.npmjs.org" | ||
|
||
- name: Build | ||
env: | ||
ALGOLIA_KEY: ${{ secrets.NX_TOKEN }} | ||
DEBUG_FILE_LEVEL: debug | ||
run: npm start | ||
|
||
- name: Generate Nginx Redirects | ||
run: | | ||
bin/redirects-yml2nginx > redirects.txt | ||
echo > redirects_pageid.txt | ||
- name: Deploy to Server | ||
run: | | ||
rsync -Wxvurk --delete site/ "${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_IP }}:/opt/www/doc/" | ||
rsync redirects.txt "${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_IP }}:/etc/nginx/redirects.txt" | ||
rsync redirects_pageid.txt ${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_IP }}:/etc/nginx/redirects_pageid.txt | ||
- name: Nginx Config Test and Restart | ||
run: | | ||
ssh "${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_IP }}" \ | ||
"service nginx configtest && service nginx restart" | ||
- name: Archive Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: build-artifacts | ||
path: | | ||
redirects_pageid.* | ||
redirects.* | ||
*.txt | ||
npm-debug.log |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,6 @@ default: | |
- '**.DS_Store' | ||
- '*~' | ||
- '*.swp' | ||
nx_assets_url: https://intranet.nuxeo.com/nuxeo | ||
# nx_assets_url: http://intranet-preprod.nuxeocloud.com/nuxeo | ||
canonical_version_preference: 'LTS 2019' | ||
new_version: '10.10' | ||
|
||
|
@@ -67,28 +65,28 @@ default: | |
platform: | ||
url: [email protected]:nuxeo/doc.nuxeo.com-content.git | ||
branches: | ||
static: | ||
'static-nx-assets': | ||
no_versioning: true | ||
design: | ||
no_versioning: true | ||
'2023': | ||
'2023-nx-assets': | ||
label: 'LTS 2023' | ||
order: 10 | ||
'2021': | ||
'2021-nx-assets': | ||
label: 'LTS 2021' | ||
order: 20 | ||
url_path: '2021' | ||
'1010': | ||
'1010-nx-assets': | ||
label: 'LTS 2019' | ||
noindex: true | ||
order: 30 | ||
url_path: '1010' | ||
'910': | ||
'910-nx-assets': | ||
label: 'LTS 2017' | ||
noindex: true | ||
order: 40 | ||
url_path: '910' | ||
'810': | ||
'810-nx-assets': | ||
label: 'LTS 2016' | ||
noindex: true | ||
order: 50 | ||
|
@@ -101,68 +99,68 @@ default: | |
label: 'none' | ||
noindex: true | ||
url_path: '60' | ||
master: | ||
'master-nx-assets': | ||
label: 'none' | ||
noindex: true | ||
url_path: 'master' | ||
java: | ||
url: [email protected]:nuxeo/doc.nuxeo.com-client-java.git | ||
branches: | ||
'3.13': | ||
'3.13-nx-assets': | ||
label: '3.13' | ||
url_path: '3.13' | ||
order: 0 | ||
'3.12': | ||
'3.12-nx-assets': | ||
label: '3.12' | ||
url_path: '3.12' | ||
noindex: true | ||
order: 10 | ||
'3.11': | ||
'3.11-nx-assets': | ||
label: '3.11' | ||
url_path: '3.11' | ||
noindex: true | ||
order: 20 | ||
'3.10': | ||
'3.10-nx-assets': | ||
label: '3.10' | ||
url_path: '3.10' | ||
noindex: true | ||
order: 30 | ||
'3.9': | ||
'3.9-nx-assets': | ||
label: '3.9' | ||
url_path: '3.9' | ||
noindex: true | ||
order: 40 | ||
'3.8': | ||
'3.8-nx-assets': | ||
label: '3.8' | ||
url_path: '3.8' | ||
noindex: true | ||
order: 50 | ||
'3.7': | ||
'3.7-nx-assets': | ||
label: '3.7' | ||
url_path: '3.7' | ||
noindex: true | ||
order: 60 | ||
'3.6': | ||
'3.6-nx-assets': | ||
label: '3.6' | ||
url_path: '3.6' | ||
noindex: true | ||
order: 70 | ||
'3.5': | ||
'3.5-nx-assets': | ||
label: '3.5' | ||
url_path: '3.5' | ||
noindex: true | ||
order: 80 | ||
'3.4': | ||
'3.4-nx-assets': | ||
label: '3.4' | ||
url_path: '3.4' | ||
noindex: true | ||
order: 90 | ||
'3.3': | ||
'3.3-nx-assets': | ||
label: '3.3' | ||
url_path: '3.3' | ||
noindex: true | ||
order: 100 | ||
'3.2': | ||
'3.2-nx-assets': | ||
label: '3.2' | ||
url_path: '3.2' | ||
noindex: true | ||
|
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
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
Oops, something went wrong.