From 12668d43754fa39a2c77679ec3752f325e5c2b94 Mon Sep 17 00:00:00 2001 From: Chris Compton <107055718+Compton-NIST@users.noreply.github.com> Date: Mon, 3 Jul 2023 12:41:22 -0500 Subject: [PATCH] Prep steps for staging. --- .../workflows/workflow-generate-website.yml | 46 +++++++++++++++++-- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/.github/workflows/workflow-generate-website.yml b/.github/workflows/workflow-generate-website.yml index 856507fa..44abdd1e 100644 --- a/.github/workflows/workflow-generate-website.yml +++ b/.github/workflows/workflow-generate-website.yml @@ -127,8 +127,8 @@ jobs: name: report path: ./lychee/out.md - deploy-website: - name: Publish to NIST Pages + deploy-dev-website: + name: Publish Development Version to NIST Pages runs-on: ubuntu-20.04 needs: - build-website @@ -154,4 +154,44 @@ jobs: publish_branch: nist-pages user_name: OSCAL GitHub Actions Bot user_email: oscal@nist.gov - commit_message: Deploying website [ci deploy] \ No newline at end of file + commit_message: Deploying website [ci deploy] + + stage-website: + name: Publish Website to OSCAL Branch for NIST Pages + runs-on: ubuntu-20.04 + needs: + - build-website + - check-links + - deploy-dev-website + steps: + - name: Checkout + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + with: + ref: nist-pages + persist-credentials: false + submodules: recursive + fetch-depth: 0 + - name: Open Website Artifact + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: website + path: . + - name: Check Directory Listing + shell: bash + run: | + find ./ + ls -ltra ./ + git status + # - name: Commit files + # run: | + # git config --local user.email "oscal@nist.gov" + # git config --local user.name "OSCAL GitHub Actions Bot" + # git commit -a -m "Updating website [ci deploy]" + # - name: Stage website in OSCAL Project + # uses: ad-m/github-push-action@40bf560936a8022e68a3c00e7d2abefaf01305a6 # v0.6.0 + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # repository: usnistgov/OSCAL + # branch: next-pages + # force: true + # directory: '.'