diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8418df0f61..f417e0a941 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,11 +41,11 @@ jobs: # Builds arm-software-developer repo - name: Build - run: hugo --minify + run: hugo --minify --config config.toml,config.cloudfront.toml # Deploys website to AWS S3 - name: Deploy to S3 - run: hugo deploy --force --maxDeletes -1 --invalidateCDN + run: hugo deploy --force --maxDeletes -1 --invalidateCDN --config config.toml,config.cloudfront.toml env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/staging-content-deploy.yml b/.github/workflows/staging-content-deploy.yml new file mode 100644 index 0000000000..d0ddb05c5a --- /dev/null +++ b/.github/workflows/staging-content-deploy.yml @@ -0,0 +1,67 @@ +# This is a basic workflow to help you get started with Actions + +name: staging-content-deploy + +# Controls when the workflow will run +on: + # Triggers the workflow on push to production branch + push: + branches: [ production ] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build_and_deploy: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + with: + submodules: true # Fetch Hugo Themes + fetch-depth: 0 + + # Sets Up Hugo + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: '0.98.0' + extended: true + + # Post-CSS install + - name: Install Post-CSS + run: npm install postcss-cli + + # Builds ecosystem-dashboard-for-arm repo + - name: Build + run: | + export HUGO_PRODUCTION=true + hugo --minify + + + # Copy SSH Key + - name: copy key + run: | + echo $SSH_KEY | xargs -n 1 > tmpkey + base64 -d < tmpkey > key + chmod 400 key + shell: bash + env: + SSH_KEY: ${{secrets.SSH_KEY}} + + # SCP Site contents to netstorage + - name: copy site content + run: | + cd public + zip -r dev-public.zip . + cd .. + scp -i key -o StrictHostKeyChecking=accept-new -oHostKeyAlgorithms=+ssh-dss -r public/dev-public.zip $USR@$HOST:/$ID/ + shell: bash + env: + USR: ${{secrets.SSH_USERNAME}} + HOST: ${{secrets.SSH_HOST}} + ID: ${{secrets.ID}} diff --git a/config.cloudfront.toml b/config.cloudfront.toml new file mode 100644 index 0000000000..68c3bafe26 --- /dev/null +++ b/config.cloudfront.toml @@ -0,0 +1,4 @@ +baseURL = "https://d1jmgdpytvgwdc.cloudfront.net/" + +[params] +dashboard_base_path = "" diff --git a/config.toml b/config.toml index 308ac81ba4..28ddfd5a75 100644 --- a/config.toml +++ b/config.toml @@ -24,6 +24,7 @@ cloudFrontDistributionID = "EBSHXJ6P4DYP8" [params] # location of assets assetsDir = "assets" +dashboard_base_path = "/ecosystem-dashboard" # Repository configuration (URLs for in-page links to opening issues and suggesting changes) github_repo = "https://github.com/ArmDeveloperEcosystem/ecosystem-dashboard-for-arm" @@ -33,4 +34,4 @@ arm_url = "https://developer.arm.com/ecosystem-dashboard/" title = 'Software Ecosystem Dashboard for Arm' description = 'Discover what software packages work on Arm servers and how to get started. A great resource for migrating to Arm.' social_image = '/ecosystem-dashboard/img/social-image.jpg' -twitter_handle = '@ArmSoftwareDev' \ No newline at end of file +twitter_handle = '@ArmSoftwareDev' diff --git a/content/linux/_index.md b/content/linux/_index.md index 4754d2f30c..ac16b39118 100644 --- a/content/linux/_index.md +++ b/content/linux/_index.md @@ -3,5 +3,5 @@ title: Cloud Software Ecosystem Dashboard for Arm os: Linux backgroundColor: 3c5610 # green textColor: 95D629 # DBFF89 # green -logo: /img/LinuxLogo.svg +logo: img/LinuxLogo.svg --- \ No newline at end of file diff --git a/content/windows/_index.md b/content/windows/_index.md index 55b6926fac..b81a151526 100644 --- a/content/windows/_index.md +++ b/content/windows/_index.md @@ -3,5 +3,5 @@ title: Windows on Arm Software Dashboard os: Windows backgroundColor: 002B49 # blue textColor: 92D2FF # light blue -logo: /img/WindowsLogo.svg +logo: img/WindowsLogo.svg --- \ No newline at end of file diff --git a/themes/arm-design-system-hugo-theme/layouts/index.html b/themes/arm-design-system-hugo-theme/layouts/index.html index 433a05e2be..bdc82d4504 100644 --- a/themes/arm-design-system-hugo-theme/layouts/index.html +++ b/themes/arm-design-system-hugo-theme/layouts/index.html @@ -14,7 +14,7 @@
diff --git a/themes/arm-design-system-hugo-theme/layouts/partials/eco-dashboard/info-top.html b/themes/arm-design-system-hugo-theme/layouts/partials/eco-dashboard/info-top.html index 339cb60f8d..274f16ae4a 100644 --- a/themes/arm-design-system-hugo-theme/layouts/partials/eco-dashboard/info-top.html +++ b/themes/arm-design-system-hugo-theme/layouts/partials/eco-dashboard/info-top.html @@ -24,10 +24,28 @@