Skip to content

Use analyze@v2

Use analyze@v2 #40

Workflow file for this run

name: Deploy to Wikipedia (main branch)
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the develop branch
push:
branches: [ main ]
# 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:
# 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@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install deploy dependencies
run: |
pip install mwparserfromhell>=0.5.0 pywikibot
- name: Get short sha
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
# Runs a set of commands using the runners shell
- name: Run deploy script
env:
BOT_NAME: ${{ secrets.BOT_NAME }}
BOT_PASS: ${{ secrets.BOT_PASS }}
run: |
echo "('Xiplus', BotPassword('${BOT_NAME}', '${BOT_PASS}'))" > user-password.py
chmod 600 user-password.py
python3 deploy.py --file spihelper.js --target User:Xiplus/js/spihelper.js --summary "${{ steps.vars.outputs.sha_short }} ${{ github.event.head_commit.message }}"
python3 deploy.py --file spihelper.css --target User:Xiplus/js/spihelper.css --summary "${{ steps.vars.outputs.sha_short }} ${{ github.event.head_commit.message }}"