This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
forked from FIRST-Tech-Challenge/FtcRobotController
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into docs/vision-processing
- Loading branch information
Showing
11 changed files
with
273 additions
and
188 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 |
---|---|---|
@@ -1,21 +1,25 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: "daily" | ||
interval: daily | ||
allow: | ||
- dependency-name: "*" | ||
dependency-type: "all" | ||
assignees: ["MatthewL246", "michaell4438"] | ||
- dependency-name: '*' | ||
dependency-type: all | ||
assignees: | ||
- MatthewL246 | ||
- michaell4438 | ||
open-pull-requests-limit: 10 | ||
|
||
- package-ecosystem: "gradle" | ||
directory: "/" | ||
- package-ecosystem: gradle | ||
directory: / | ||
schedule: | ||
interval: "daily" | ||
interval: daily | ||
allow: | ||
- dependency-name: "*" | ||
dependency-type: "all" | ||
assignees: ["MatthewL246", "michaell4438"] | ||
- dependency-name: '*' | ||
dependency-type: all | ||
assignees: | ||
- MatthewL246 | ||
- michaell4438 | ||
open-pull-requests-limit: 10 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,144 @@ | ||
# Simple workflow for deploying static content to GitHub Pages | ||
name: Deploy static content to Pages | ||
|
||
# Before changing any of these workflow triggers, make sure you understand the if statements for each of the jobs | ||
on: | ||
# Run automatically after the Android CI release finishes | ||
workflow_run: | ||
workflows: [ "Android CI" ] | ||
branches: [ "master" ] | ||
types: [ "completed" ] | ||
workflows: | ||
- Android CI | ||
branches: | ||
- master | ||
types: | ||
- completed | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow one concurrent deployment | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
# Run on pull requests to master | ||
pull_request: | ||
# Note that this specifies the target branch, not the branch that the PR is from | ||
branches: | ||
- master | ||
|
||
jobs: | ||
# Single deploy job since we're just deploying | ||
deploy: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
build: | ||
# Run if the Android CI build was successful, on PRs from docs/ branches, or if this is a manual workflow run | ||
if: ${{ github.event.workflow_run.conclusion == 'success' || startsWith(github.head_ref, 'docs/') || github.event_name == 'workflow_dispatch' }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Build Website | ||
run: | | ||
echo -e "Running build script with Python..." | ||
python deploy.py | ||
echo -e "Script complete." | ||
shell: bash | ||
|
||
- name: Build website | ||
run: ./build.sh | ||
working-directory: ./HelpPage/scripts/ | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
java-version: 11 | ||
distribution: temurin | ||
cache: gradle | ||
|
||
- name: Build JavaDoc using Dokka | ||
run: | | ||
./gradlew :TeamCode:dokkaHtml --no-daemon | ||
mv ./TeamCode/build/dokka/html ./HelpPage/opt/javadoc | ||
mv ./TeamCode/build/dokka/html ./HelpPage/build/javadoc | ||
- name: Upload Pages build artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
name: github-pages-build | ||
path: ./HelpPage/build | ||
retention-days: 90 | ||
|
||
deploy: | ||
# Only run deployment from the master branch and not on pull requests | ||
if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }} | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
# Only allow one concurrent deployment | ||
concurrency: | ||
group: pages-deploy | ||
cancel-in-progress: false | ||
|
||
steps: | ||
- name: Configure Pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Download Pages build artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: github-pages-build | ||
|
||
- name: Extract Pages build artifact | ||
run: | | ||
mkdir pages-build | ||
tar -xvf artifact.tar -C pages-build | ||
- name: Download the latest APK | ||
run: | | ||
mkdir -p ./HelpPage/opt/apk/bin | ||
cd ./HelpPage/opt/apk/bin | ||
mkdir -p ./pages-build/apk/bin | ||
cd ./pages-build/apk/bin | ||
curl -LO https://github.com/XaverianTeamRobotics/FtcRobotController/releases/download/latest-ci-build/TeamCode-debug.apk | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
- name: Upload Artifact | ||
- name: Upload final Pages artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
# Upload final build | ||
path: './HelpPage/opt' | ||
name: github-pages-deploy | ||
path: ./pages-build | ||
retention-days: 90 | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@main | ||
uses: actions/deploy-pages@v2 | ||
with: | ||
artifact_name: github-pages-deploy | ||
|
||
test-deploy: | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
# Only allow one concurrent test deployment per branch | ||
concurrency: | ||
group: pages-test-deploy-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- name: Download Pages build artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: github-pages-build | ||
|
||
- name: Extract Pages build artifact | ||
run: | | ||
mkdir pages-build | ||
tar -xvf artifact.tar -C pages-build | ||
- name: Upload build to Cloudflare Pages | ||
id: test-deployment | ||
uses: cloudflare/pages-action@v1 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
projectName: xbhs-robotics-docs | ||
directory: pages-build | ||
|
||
- name: Add comment with test deployment URL | ||
if: ${{ github.event_name == 'pull_request' }} | ||
run: > | ||
gh pr comment ${{ github.event.number }} | ||
--repo ${{ github.repository }} | ||
--body "Your docs changes were built successfully! | ||
View a preview of them at ${{ steps.test-deployment.outputs.url }}" | ||
env: | ||
GH_TOKEN: ${{ github.token }} |
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 was deleted.
Oops, something went wrong.
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,31 @@ | ||
#!/bin/sh | ||
|
||
set -eu | ||
|
||
echo Running build... | ||
rm -rf ../build | ||
|
||
echo Building Docusaurus... | ||
cd ../doc | ||
npm install | ||
npm run build | ||
echo Docusaurus build complete. | ||
|
||
echo Building imgutil... | ||
cd ../imgutil | ||
npm install | ||
npm run build | ||
echo Imgutil build complete. | ||
|
||
echo "Bundling..." | ||
cd .. | ||
mkdir output | ||
# Move docusaurus build to final output | ||
mv ./doc/build ./build | ||
# Move imgutil build to final output | ||
mv ./imgutil/dist ./build/imgutil | ||
# Move static files to final output | ||
mv ./apk ./build/apk | ||
mv ./legacy-apk ./build/legacy-apk | ||
|
||
echo Build complete. |
Oops, something went wrong.