Update end date for v15 #64
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
name: GitHub Pages | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18.x' | |
- name: Upgrade pip | |
run: python3 -m pip install --upgrade pip | |
- name: Install python requirements | |
run: python3 -m pip install -r requirements.txt | |
- name: Get banner message | |
run: echo "BANNER_MESSAGE=$(<website-banner.production)" >> $GITHUB_ENV | |
- name: Toggle banner if there is a message | |
run: | | |
if [[ -z "${BANNER_MESSAGE}" ]]; then | |
echo "BANNER_ENABLED=False" >> $GITHUB_ENV | |
else | |
echo "BANNER_ENABLED=True" >> $GITHUB_ENV | |
fi | |
- name: Build website | |
run: python3 update-attack.py --attack-brand --extras --no-test-exitstatus | |
env: | |
GOOGLE_ANALYTICS: ${{ secrets.GOOGLE_ANALYTICS }} | |
GOOGLE_SITE_VERIFICATION: ${{ secrets.GOOGLE_SITE_VERIFICATION }} | |
- name: Cleanup build | |
run: rm -rf attack-versions | |
- name: Remove STIX directory | |
run: rm -rf output/stix/ | |
- name: Build ATT&CK Search module | |
run: | | |
cd attack-search | |
npm ci | |
npm run build | |
cp dist/search_bundle.js ../output/theme/scripts/ | |
cd .. | |
- name: Add BlueSky Identification | |
if: ${{ vars.BLUESKY_ID != '' }} | |
run: | | |
mkdir output/.well-known | |
echo "${{ vars.BLUESKY_ID }}" > output/.well-known/atproto-did | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
if: ${{ github.ref == 'refs/heads/master' }} | |
with: | |
deploy_key: ${{ secrets.DEPLOY_KEY }} | |
publish_dir: ./output | |
cname: attack.mitre.org |