Skip to content

ts笔记:More on Functions #55

ts笔记:More on Functions

ts笔记:More on Functions #55

Workflow file for this run

name: Issue to Hexo
on:
issues:
# Sufficient to trigger this workflow when an issue is milestoned
types: [ milestoned ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Checkout
uses: actions/checkout@v4
# - name: post issues
# uses: internalstability/action-issue-to-hexo@v1.0.0
# with:
# issue_url: ${{ github.event.issue.url }}
# # Personal access token used to get information of Issue
# token: ${{ secrets.token }}
# At this point, a markdown file is generated and untracked
# Take further action, e.g. generate (`hexo generate`), commit and push
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- name: Use Node.js 14.x
uses: actions/setup-node@v3.8.1
with:
node-version: '14.x'
# - name: Cache NPM dependencies
# uses: actions/cache@v2
# with:
# path: node_modules
# key: ${{ runner.OS }}-npm-cache
# restore-keys: |
# ${{ runner.OS }}-npm-cache
- name: Install Dependencies
run: npm install
- run: echo "Install Dependencies done"
- name: Issue to post
env:
issueUrl: ${{ github.event.issue.url }}
# Personal access token used to get information of Issue
issueToken: ${{ secrets.GITHUB_TOKEN }}
run: npm run issue-post
- name: commitchange
env:
ID_RSA: ${{secrets.ID_RSA}}
EMAIL: ${{secrets.EMAIL}}
run: |
mkdir -p ~/.ssh/
echo "$ID_RSA" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
git config --global user.name "Topppy"
git config --global user.email $EMAIL
git add .
git commit -m "issueblog: ${{ github.event.issue.url }} "
git push
npm run deploy